<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>发货订单</title>
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <el-form :inline="true" :form="form">
            <el-form-item>
                <el-select @change="ChangeRowStatus" clearable v-model="form.Row_Status" placeholder="请选择发货订单状态">
                    <el-option v-for="item in Row_Status" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-input @change="ChangeWarehouse" v-model="form.Warehouse_Name" placeholder="请输入仓库名" />
            </el-form-item>
            <el-form-item>
                <el-input v-model="form.Article_Name" placeholder="请输入商品名" />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSerach">查询</el-button>
            </el-form-item>
        </el-form>
        <el-table stripe ref="multipleTable" border :data="tableData" height="calc(100vh - 140px)"  style="width: 100%"
            @selection-change="handleSelectionChange">
            <el-table-column align="center" label="序号" type="index" width="55"></el-table-column>
            <el-table-column align="center" prop="Warehouse_Name" label="发货仓库"></el-table-column>
            <el-table-column align="center" prop="Logistics_Date" label="发货时间"></el-table-column>
            <el-table-column align="center" prop="Logistics_Number" label="物流单号"></el-table-column>
            <el-table-column align="center" prop="Contact_Address" label="发货地址">
                <template v-slot="{row}">
                    <div :title="row.Contact_Address"
                        style="width: 100%; white-space: nowrap; text-overflow: ellipsis;overflow: hidden;">
                        <span>{{row.Contact_Address}}</span>
                    </div>
                </template>
            </el-table-column>
            <el-table-column align="center" label="商品名称">
                <template v-slot="{row}">
                    <div :title="row.Article_Name"
                        style="width: 100%; white-space: nowrap; text-overflow: ellipsis;overflow: hidden;">
                        <span>{{row.Article_Name}}</span>
                    </div>
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Delivery_Quantity" label="商品发货数量"></el-table-column>
            <el-table-column align="center" prop="Collection_Date" label="下单时间"></el-table-column>
            <el-table-column align="center" label="状态">
                <template v-slot="{row}">
                    <el-tag v-if="row.Row_Status=='0'">待发货</el-tag>
                    <el-tag v-if="row.Row_Status=='1'" type="warning">已发货</el-tag>
                    <el-tag v-if="row.Row_Status=='2'" type="danger">已送达</el-tag>
                </template>
            </el-table-column>
            <el-table-column align="center" label="操作">
                <template v-slot="{row}">
                    <el-button :loading="loading" @click="Shipments(row)" v-if="JSON.parse(sessionStorage.getItem('RoleArr')).some(item=>item=='B0069')&&row.Row_Status=='0'&&row.Settled_Enterprise_Info_SerialNumber==enterprise"
                        type="danger">发货</el-button>
                </template>
            </el-table-column>
        </el-table>
        <el-pagination background v-show="total > 0" @size-change="handleSizeChange" @current-change="handleCurrentChange"
            :current-page="form.page" :page-sizes="[10,50,100,500,1000]" :page-size="form.limit"
            layout="total, sizes, prev, pager, next, jumper" :total="total">
          </el-pagination>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="../../../js/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../js/FileSaver.js"></script>
    <script type="text/javascript" src="../../../js/xlsx.full.min.js"></script>
    <script type="text/javascript" src="./js/FulfillOrder.js"></script>
</body>

</html>